#!/usr/bin/env python
# _*_ coding:utf-8 _*_
 
"""
  Copyright: 2016-2018(c) ROS小课堂 www.corvin.cn
  FileName: dynamic.cfg
  Author: corvin
  Description:
    dynamic_reconfigure需要使用的cfg配置文件，该文件使用python来实现.
  History:
    20180503: init this file.
"""
 
PACKAGE = "turtlesim_dynamic"
 
from dynamic_reconfigure.parameter_generator_catkin import *
 
gen = ParameterGenerator()
 
gen.add("cmd_topic",    str_t,    0, "turtlesim cmd topic name", "/turtle1/cmd_vel")
gen.add("cmd_pub_rate", int_t,    0, "turtlesim cmd pub rate", 1, 0, 5)
gen.add("linear_x",     double_t, 0, "turtlesim linear.x", 1.0, 0.5, 3.0)
gen.add("angular_z",    double_t, 0, "turtlesim angular.z", 1.0, 0.5, 3.0)
gen.add("move_flag",    bool_t,   0, "turtlesim whether move or not", True )
 
log_enum = gen.enum([ gen.const("info", int_t, 0, "log print flag:INFO"),
                      gen.const("warn", int_t, 1, "log print flag:WARN"),
                      gen.const("error", int_t, 2, "log print flag:ERROR")],
                      "Set Log Level")
gen.add("log_level", int_t, 0, "Set Log Level", 0, 0, 2, edit_method=log_enum)
 
exit(gen.generate(PACKAGE, "turtlesim_dynamic_node", "dynamic"))